home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / Cpp4VB / WINTLB / GDI.ODL < prev    next >
Text File  |  1996-02-28  |  66KB  |  1,887 lines

  1.  
  2.  
  3. [
  4. uuid(54674044-3A82-101B-8181-00AA003743D3),
  5. helpstring("Windows GDI Functions"),
  6. #ifdef WIN32
  7. dllname("GDI32.DLL")
  8. #else
  9. dllname("GDI.EXE")
  10. #endif
  11. ]
  12. module GDI {
  13.  
  14.     // ****** DC Management *******
  15.  
  16.     /*
  17.     HDC     WINAPI CreateDC(LPCSTR, LPCSTR, LPCSTR, const void FAR *);
  18.     HDC     WINAPI CreateIC(LPCSTR, LPCSTR, LPCSTR, const void FAR *);
  19.     */
  20.  
  21.     [
  22.     usesgetlasterror,
  23.     entry("CreateCompatibleDC"),
  24.     helpstring("Creates a memory DC compatible with a given DC"),
  25.     ]
  26.     HDC     WINAPI CreateCompatibleDC([in] HDC hdc);
  27.  
  28.     [
  29.     usesgetlasterror,
  30.     entry("DeleteDC"),
  31.     helpstring("Deletes a given DC"),
  32.     ]
  33.     BOOL    WINAPI DeleteDC([in] HDC hdc);
  34.  
  35.     /*
  36.     DWORD   WINAPI GetDCOrg([in] HDC hdc);
  37.  
  38.     int     WINAPI SaveDC([in] HDC hdc);
  39.     BOOL    WINAPI RestoreDC([in] HDC hdc, int);
  40.  
  41.     */
  42.  
  43.     /* Omitted
  44.     int     WINAPI MulDiv(int, int, int);
  45.     */
  46.  
  47.     /* Omitted
  48.     // Drawing bounds accumulation APIs
  49.     UINT    WINAPI SetBoundsRect(HDC hDC, const RECT FAR * lprcBounds, UINT flags);
  50.     UINT    WINAPI GetBoundsRect(HDC hDC, RECT FAR * lprcBounds, UINT flags);
  51.     */
  52.  
  53.     // ****** Device Capabilities *******
  54.  
  55.  
  56.     [
  57.     usesgetlasterror,
  58.     entry("GetDeviceCaps"),
  59.     helpstring("Gets the capabilitis of given DC"),
  60.     ]
  61.     int WINAPI GetDeviceCaps([in] HDC hdc, [in] int iCapability);
  62.  
  63.     // ****** Coordinate transformation support *********
  64.  
  65.     /*
  66.     int     WINAPI SetMapMode([in] HDC hdc, int);
  67.     int     WINAPI GetMapMode([in] HDC hdc);
  68.  
  69.     DWORD   WINAPI SetWindowOrg([in] HDC hdc, int, int);
  70.     DWORD   WINAPI GetWindowOrg([in] HDC hdc);
  71.  
  72.     DWORD   WINAPI SetWindowExt([in] HDC hdc, int, int);
  73.     DWORD   WINAPI GetWindowExt([in] HDC hdc);
  74.  
  75.     DWORD   WINAPI OffsetWindowOrg([in] HDC hdc, int, int);
  76.     DWORD   WINAPI ScaleWindowExt([in] HDC hdc, int, int, int, int);
  77.  
  78.     DWORD   WINAPI SetViewportOrg([in] HDC hdc, int, int);
  79.     DWORD   WINAPI GetViewportOrg([in] HDC hdc);
  80.  
  81.     DWORD   WINAPI SetViewportExt([in] HDC hdc, int, int);
  82.     DWORD   WINAPI GetViewportExt([in] HDC hdc);
  83.  
  84.     DWORD   WINAPI OffsetViewportOrg([in] HDC hdc, int, int);
  85.     DWORD   WINAPI ScaleViewportExt([in] HDC hdc, int, int, int, int);
  86.  
  87.     BOOL    WINAPI SetWindowOrgEx([in] HDC hdc, int, int, POINT FAR *);
  88.     BOOL    WINAPI GetWindowOrgEx([in] HDC hdc, POINT FAR *);
  89.  
  90.     BOOL    WINAPI SetWindowExtEx([in] HDC hdc, int, int, SIZE FAR *);
  91.     BOOL    WINAPI GetWindowExtEx([in] HDC hdc, SIZE FAR *);
  92.  
  93.     BOOL    WINAPI OffsetWindowOrgEx([in] HDC hdc, int, int, POINT FAR *);
  94.     BOOL    WINAPI ScaleWindowExtEx([in] HDC hdc, int, int, int, int, SIZE FAR *);
  95.  
  96.     BOOL    WINAPI SetViewportExtEx([in] HDC hdc, int, int, SIZE FAR *);
  97.     BOOL    WINAPI GetViewportExtEx([in] HDC hdc, SIZE FAR *);
  98.  
  99.     BOOL    WINAPI SetViewportOrgEx([in] HDC hdc, int, int, POINT FAR *);
  100.     BOOL    WINAPI GetViewportOrgEx([in] HDC hdc, POINT FAR *);
  101.  
  102.     BOOL    WINAPI OffsetViewportOrgEx([in] HDC hdc, int, int, POINT FAR *);
  103.     BOOL    WINAPI ScaleViewportExtEx([in] HDC hdc, int, int, int, int, SIZE FAR *);
  104.  
  105.     BOOL    WINAPI DPtoLP([in] HDC hdc, POINT FAR *, int);
  106.     BOOL    WINAPI LPtoDP([in] HDC hdc, POINT FAR *, int);
  107.     */
  108.  
  109.     // ****** Color support *******
  110.  
  111.     [
  112.     usesgetlasterror,
  113.     entry("GetNearestColor"),
  114.     helpstring("Returns color from system palette that will be displayed when the given color value is used"),
  115.     ]
  116.     COLORREF WINAPI GetNearestColor([in] HDC hdc, [in] COLORREF clrref);
  117.  
  118.     // ****** GDI Object Support ********
  119.  
  120.     [
  121.     usesgetlasterror,
  122.     entry("IsGDIObject"),
  123.     helpstring("Returns TRUE if argument is handle to GDI object"),
  124.     ]
  125.     BOOL    WINAPI IsGDIObject([in] HGDIOBJ hgidobj);
  126.  
  127.     [
  128.     usesgetlasterror,
  129.     entry("GetStockObject"),
  130.     helpstring("Returns the handle of stock pen, brush or font specified by fnObject constant"),
  131.     ]
  132.     HGDIOBJ WINAPI GetStockObject([in] int fnObject);
  133.  
  134.     [
  135.     usesgetlasterror,
  136.     entry("DeleteObject"),
  137.     helpstring("Deletes a given GDI object"),
  138.     ]
  139.     BOOL    WINAPI DeleteObject([in] HGDIOBJ hgdiobj);
  140.  
  141.     [
  142.     usesgetlasterror,
  143.     entry("SelectObject"),
  144.     helpstring("Selects a given GDI object into a DC, returning the previous object"),
  145.     ]
  146.     HGDIOBJ WINAPI SelectObject([in] HDC hdc, [in] HGDIOBJ hgdiobj);
  147.  
  148.     /*
  149.     int     WINAPI GetObject(HGDIOBJ, int, void FAR *);
  150.     BOOL    WINAPI UnrealizeObject(HGDIOBJ);
  151.     */
  152.  
  153.     /* Omitted
  154.     typedef (CALLBACK* GOBJENUMPROC)(void FAR *, LPARAM);
  155.  
  156.     int     WINAPI EnumObjects([in] HDC hdc, int, GOBJENUMPROC, LPARAM);
  157.     */
  158.  
  159.     // ****** Pen support **********
  160.  
  161.     /*
  162.     // Logical Pen
  163.     typedef struct tagLOGPEN
  164.     {
  165.         UINT    lopnStyle;
  166.         POINT   lopnWidth;
  167.         COLORREF lopnColor;
  168.     } LOGPEN;
  169.     typedef LOGPEN*       PLOGPEN;
  170.     typedef LOGPEN NEAR * NPLOGPEN;
  171.     typedef LOGPEN FAR *  LPLOGPEN;
  172.  
  173.     HPEN    WINAPI CreatePen(int, int, [in] COLORREF clrref);
  174.     HPEN    WINAPI CreatePenIndirect(LOGPEN FAR *);
  175.     */
  176.  
  177.     // ****** Brush support *********
  178.  
  179.     /*
  180.     // Logical Brush (or Pattern)
  181.     typedef struct tagLOGBRUSH
  182.     {
  183.         UINT     lbStyle;
  184.         COLORREF lbColor;
  185.         int      lbHatch;
  186.     } LOGBRUSH;
  187.     typedef LOGBRUSH*       PLOGBRUSH;
  188.     typedef LOGBRUSH NEAR * NPLOGBRUSH;
  189.     typedef LOGBRUSH FAR *  LPLOGBRUSH;
  190.  
  191.     typedef LOGBRUSH        PATTERN;
  192.     typedef PATTERN*       PPATTERN;
  193.     typedef PATTERN NEAR * NPPATTERN;
  194.     typedef PATTERN FAR *  LPPATTERN;
  195.  
  196.     HBRUSH  WINAPI CreateSolidBrush([in] COLORREF clrref);
  197.     HBRUSH  WINAPI CreateHatchBrush(int, [in] COLORREF clrref);
  198.     HBRUSH  WINAPI CreatePatternBrush([in] HBITMAP hbm);
  199.     HBRUSH  WINAPI CreateDIBPatternBrush(HGLOBAL, UINT);
  200.     HBRUSH  WINAPI CreateBrushIndirect(LOGBRUSH FAR *);
  201.  
  202.     DWORD   WINAPI SetBrushOrg([in] HDC hdc, int, int);
  203.     DWORD   WINAPI GetBrushOrg([in] HDC hdc);
  204.  
  205.     BOOL    WINAPI GetBrushOrgEx([in] HDC hdc, POINT FAR *);
  206.     */
  207.  
  208.     // ****** Region support *******
  209.  
  210.     /*
  211.     HRGN    WINAPI CreateRectRgn(int, int, int, int);
  212.     HRGN    WINAPI CreateRectRgnIndirect(const RECT FAR *);
  213.     HRGN    WINAPI CreateEllipticRgnIndirect(const RECT FAR *);
  214.     HRGN    WINAPI CreateEllipticRgn(int, int, int, int);
  215.     HRGN    WINAPI CreatePolygonRgn(const POINT FAR *, int, int);
  216.     HRGN    WINAPI CreatePolyPolygonRgn(const POINT FAR *, const int FAR *, int, int);
  217.     HRGN    WINAPI CreateRoundRectRgn(int, int, int, int, int, int);
  218.  
  219.     void    WINAPI SetRectRgn(HRGN, int, int, int, int);
  220.  
  221.     int     WINAPI CombineRgn(HRGN, HRGN, HRGN, int);
  222.  
  223.     BOOL    WINAPI EqualRgn(HRGN, HRGN);
  224.     int     WINAPI OffsetRgn(HRGN, int, int);
  225.  
  226.     int     WINAPI GetRgnBox(HRGN, RECT FAR *);
  227.  
  228.     BOOL    WINAPI RectInRegion(HRGN, const RECT FAR *);
  229.     BOOL    WINAPI PtInRegion(HRGN, int, int);
  230.     */
  231.  
  232.     // ****** Color Palette Support *********
  233.  
  234.     /*
  235.     //define PALETTERGB(r,g,b)   (0x02000000L | RGB(r,g,b))
  236.     //define PALETTEINDEX(i)     ((COLORREF)(0x01000000L | (DWORD)(WORD)(i)))
  237.  
  238.     typedef struct tagPALETTEENTRY
  239.     {
  240.         BYTE    peRed;
  241.         BYTE    peGreen;
  242.         BYTE    peBlue;
  243.         BYTE    peFlags;
  244.     } PALETTEENTRY;
  245.     typedef PALETTEENTRY FAR * LPPALETTEENTRY;
  246.  
  247.     // Logical Palette
  248.     typedef struct tagLOGPALETTE
  249.     {
  250.         WORD    palVersion;
  251.         WORD    palNumEntries;
  252.         PALETTEENTRY palPalEntry[1];
  253.     } LOGPALETTE;
  254.     typedef LOGPALETTE*       PLOGPALETTE;
  255.     typedef LOGPALETTE NEAR * NPLOGPALETTE;
  256.     typedef LOGPALETTE FAR *  LPLOGPALETTE;
  257.  
  258.     HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR *);
  259.  
  260.     HPALETTE WINAPI SelectPalette([in] HDC hdc, HPALETTE, BOOL);
  261.  
  262.     UINT    WINAPI RealizePalette([in] HDC hdc);
  263.  
  264.     int     WINAPI UpdateColors([in] HDC hdc);
  265.     void    WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR *);
  266.  
  267.     UINT    WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR *);
  268.     UINT    WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR *);
  269.  
  270.     UINT    WINAPI GetNearestPaletteIndex(HPALETTE, [in] COLORREF clrref);
  271.  
  272.     BOOL    WINAPI ResizePalette(HPALETTE, UINT);
  273.  
  274.     UINT    WINAPI GetSystemPaletteEntries([in] HDC hdc, UINT, UINT, PALETTEENTRY FAR *);
  275.  
  276.     UINT    WINAPI GetSystemPaletteUse([in] HDC hdc);
  277.     UINT    WINAPI SetSystemPaletteUse([in] HDC hdc, UINT);
  278.  
  279.     */
  280.  
  281.     // ****** Clipping support ******
  282.  
  283.     /*
  284.     int     WINAPI SelectClipRgn([in] HDC hdc, HRGN);
  285.     int     WINAPI GetClipBox([in] HDC hdc, RECT FAR *);
  286.  
  287.     int     WINAPI IntersectClipRect([in] HDC hdc, int, int, int, int);
  288.     int     WINAPI OffsetClipRgn([in] HDC hdc, int, int);
  289.     int     WINAPI ExcludeClipRect([in] HDC hdc, int, int, int, int);
  290.  
  291.     BOOL    WINAPI PtVisible([in] HDC hdc, int, int);
  292.     BOOL    WINAPI RectVisible([in] HDC hdc, const RECT FAR *);
  293.     */
  294.  
  295.     // ****** General drawing support *******
  296.  
  297.     [
  298.     usesgetlasterror,
  299.     entry("MoveToEx"),
  300.     helpstring("Moves current position to (x,y) without displaying; return last position in lpPoint"),
  301.     ]
  302.     BOOL    WINAPI MoveToEx([in] HDC hdc, [in] int X, [in] int Y,
  303.                             [in, out] int * lpPoint);
  304.  
  305.     [
  306.     usesgetlasterror,
  307.     entry("MoveToEx"),
  308.     helpstring("Moves current position to (x,y) without displaying (ignore compatibility null parameter)"),
  309.     ]
  310.     BOOL    WINAPI MoveToNull([in] HDC hdc, [in] int X, [in] int Y,
  311.                               [in] long lpNull);
  312.  
  313.     #ifndef WIN32
  314.     [
  315.     usesgetlasterror,
  316.     entry("MoveTo"),
  317.     helpstring("Moves current position to (x,y)"),
  318.     ]
  319.     DWORD   WINAPI MoveTo([in] HDC hdc, [in] int X, [in] int Y);
  320.     #endif
  321.  
  322.     [
  323.     usesgetlasterror,
  324.     entry("LineTo"),
  325.     helpstring("Draws from current position to (x,y) with current pen"),
  326.     ]
  327.     BOOL    WINAPI LineTo([in] HDC hdc, [in] int X, [in] int Y);
  328.  
  329.     #ifndef WIN32
  330.     [
  331.     usesgetlasterror,
  332.     entry("GetCurrentPosition"),
  333.     helpstring("Gets current position packed in a DWORD"),
  334.     ]
  335.     DWORD   WINAPI GetCurrentPosition([in] HDC hdc);
  336.     #endif
  337.  
  338. //@B GetCurrentPositionEx
  339.     [
  340.     usesgetlasterror,
  341.     entry("GetCurrentPositionEx"),
  342.     helpstring("Get current position in a POINT structure"),
  343.     ]
  344.     BOOL    WINAPI GetCurrentPositionEx([in] HDC hdc,
  345.                                         [in, out] int FAR * lpPoint);
  346. //@E GetCurrentPositionEx
  347.  
  348.     // BOOL WINAPI Polyline([in] HDC hdc, const POINT FAR *, int);
  349.     #ifdef WIN32
  350.     // BOOL WINAPI PolylineTo([in] HDC hdc, CONST POINT *, DWORD);
  351.  
  352.     [
  353.     usesgetlasterror,
  354.     entry("PolyBezier"),
  355.     helpstring("Draws Bezier curve controlled by array of points (cPoint specified size of array)"),
  356.     ]
  357.     BOOL    WINAPI PolyBezier([in] HDC hdc, [in] int * lppt,
  358.                               [in] DWORD cPoints);
  359.  
  360.     [
  361.     usesgetlasterror,
  362.     entry("PolyBezierTo"),
  363.     helpstring("Draws Bezier curve controlled by array of points (cPoint specified size of array) and moves to last point"),
  364.     ]
  365.     BOOL    WINAPI PolyBezierTo([in] HDC hdc, [in] int * lppt,
  366.                                 [in] DWORD cPoints);
  367.     #endif
  368.  
  369.     [
  370.     usesgetlasterror,
  371.     entry("Rectangle"),
  372.     helpstring("Draws rectangle around given points with current pen filled with current brush"),
  373.     ]
  374.     BOOL    WINAPI Rectangle([in] HDC hdc,
  375.                              [in] int nLeft, [in] int nTop,
  376.                              [in] int nRight, [in] int nBottom);
  377.  
  378.     [
  379.     usesgetlasterror,
  380.     entry("RoundRect"),
  381.     helpstring("Draws rounded rectangle around given points with current pen and filled with current brush, using ellipse of (nWidth, nHeight) on corners"),
  382.     ]
  383.     BOOL    WINAPI RoundRect([in] HDC hdc,
  384.                              [in] int nLeft, [in] int nTop,
  385.                              [in] int nRight, [in] int nBottom,
  386.                              [in] int nWidth, [in] int nHeight);
  387.  
  388.     [
  389.     usesgetlasterror,
  390.     entry("Ellipse"),
  391.     helpstring("Draws ellipse bounded by given points with current pen and filled with current brush"),
  392.     ]
  393.     BOOL    WINAPI Ellipse([in] HDC hdc,
  394.                            [in] int nLeft, [in] int nTop,
  395.                            [in] int nRight, [in] int nBottom);
  396.  
  397.     [
  398.     usesgetlasterror,
  399.     entry("Arc"),
  400.     helpstring("Draws an elliptical arc"),
  401.     ]
  402.     BOOL WINAPI Arc([in] HDC hDC,
  403.                     [in] int nLeftRect, [in] int nTopRect,
  404.                     [in] int nRightRect, [in] int nBottomRect,
  405.                     [in] int nXRadial1, [in] int nYRadial1,
  406.                     [in] int nXRadial2, [in] int nYRadial2);
  407.  
  408.     [
  409.     usesgetlasterror,
  410.     entry("Chord"),
  411.     helpstring("Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a secant)"),
  412.     ]
  413.     BOOL WINAPI Chord([in] HDC hDC,
  414.                       [in] int nLeftRect, [in] int nTopRect,
  415.                       [in] int nRightRect, [in] int nBottomRect,
  416.                       [in] int nXRadial1, [in] int nYRadial1,
  417.                       [in] int nXRadial2, [in] int nYRadial2);
  418.  
  419.     [
  420.     usesgetlasterror,
  421.     entry("Pie"),
  422.     helpstring("Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials"),
  423.     ]
  424.     BOOL WINAPI Pie([in] HDC hDC,
  425.                     [in] int nLeftRect, [in] int nTopRect,
  426.                     [in] int nRightRect, [in] int nBottomRect,
  427.                     [in] int nXRadial1, [in] int nYRadial1,
  428.                     [in] int nXRadial2, [in] int nYRadial2);
  429.  
  430.     [
  431.     usesgetlasterror,
  432.     entry("Polygon"),
  433.     helpstring("Draws a polygon"),
  434.     ]
  435.     BOOL WINAPI Polygon([in] HDC hdc, [in] int FAR * lppt,
  436.                         [in] int cPoints);
  437.  
  438.     // BOOL WINAPI PolyPolygon([in] HDC hdc, const POINT FAR *, int FAR *, int);
  439.  
  440.  
  441.     // int  WINAPI SetPolyFillMode([in] HDC hdc, int);
  442.  
  443.     // int  WINAPI GetPolyFillMode([in] HDC hdc);
  444.  
  445.     /* Omitted
  446.     typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM);
  447.     void    WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM);
  448.     */
  449.  
  450.     [
  451.     usesgetlasterror,
  452.     entry("FloodFill"),
  453.     helpstring("Fill to the nearest clrref border with current brush starting at x,y"),
  454.     ]
  455.     BOOL    WINAPI FloodFill([in] HDC hdc,
  456.                              [in] int nXStart, [in] int nYStart,
  457.                              [in] COLORREF clrref);
  458.  
  459.     [
  460.     usesgetlasterror,
  461.     entry("ExtFloodFill"),
  462.     helpstring("Fill to nearest clrref border with current brush starting at x,y with given fill type"),
  463.     ]
  464.     BOOL    WINAPI ExtFloodFill([in] HDC hdc,
  465.                                 [in] int nXStart, [in] int nYStart,
  466.                                 [in] COLORREF clrref,
  467.                                 [in] UINT fuFillType);
  468.  
  469.     /*
  470.     BOOL    WINAPI FillRgn([in] HDC hdc, HRGN, HBRUSH);
  471.     BOOL    WINAPI FrameRgn([in] HDC hdc, HRGN, HBRUSH, int, int);
  472.     BOOL    WINAPI InvertRgn([in] HDC hdc, HRGN);
  473.     BOOL    WINAPI PaintRgn([in] HDC hdc, HRGN);
  474.  
  475.     // Rectangle output routines
  476.     int     WINAPI FillRect([in] HDC hdc, const RECT FAR *, HBRUSH);
  477.     int     WINAPI FrameRect([in] HDC hdc, const RECT FAR *, HBRUSH);
  478.     void    WINAPI InvertRect([in] HDC hdc, const RECT FAR *);
  479.  
  480.     void    WINAPI DrawFocusRect([in] HDC hdc, const RECT FAR *);
  481.     */
  482.  
  483.     // ****** Text support *********
  484.  
  485.     /*
  486.     BOOL    WINAPI TextOut([in] HDC hdc, int, int, LPCSTR, int);
  487.     LONG    WINAPI TabbedTextOut([in] HDC hdc, int, int, LPCSTR, int, int, int FAR *, int);
  488.     BOOL    WINAPI ExtTextOut([in] HDC hdc, int, int, UINT, const RECT FAR *, LPCSTR, UINT, int FAR *);
  489.  
  490.     DWORD   WINAPI GetTextExtent([in] HDC hdc, LPCSTR, int);
  491.     DWORD   WINAPI GetTabbedTextExtent([in] HDC hdc, LPCSTR, int, int, int FAR *);
  492.  
  493.     BOOL    WINAPI GetTextExtentPoint([in] HDC hdc, LPCSTR, int, SIZE FAR *);
  494.  
  495.     int     WINAPI DrawText([in] HDC hdc, LPCSTR, int, RECT FAR *, UINT);
  496.  
  497.     typedef BOOL (CALLBACK* GRAYSTRINGPROC)([in] HDC hdc, LPARAM, int);
  498.     BOOL    WINAPI GrayString([in] HDC hdc, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
  499.  
  500.     BOOL    WINAPI GetCharWidth([in] HDC hdc, UINT, UINT, int FAR *);
  501.     */
  502.  
  503.     [
  504.     usesgetlasterror,
  505.     entry("SetTextColor"),
  506.     helpstring("Sets the text (foreground) color of a DC"),
  507.     ]
  508.     COLORREF WINAPI SetTextColor([in] HDC hdc, [in] COLORREF clrref);
  509.  
  510.     [
  511.     usesgetlasterror,
  512.     entry("GetTextColor"),
  513.     helpstring("Gets the text (foreground) color of a DC"),
  514.     ]
  515.     COLORREF WINAPI GetTextColor([in] HDC hdc);
  516.  
  517.     [
  518.     usesgetlasterror,
  519.     entry("SetBkColor"),
  520.     helpstring("Set the background color of a DC"),
  521.     ]
  522.     COLORREF WINAPI SetBkColor([in] HDC hdc, [in] COLORREF clrref);
  523.  
  524.     [
  525.     usesgetlasterror,
  526.     entry("GetBkColor"),
  527.     helpstring("Get the background color of a DC"),
  528.     ]
  529.     COLORREF WINAPI GetBkColor([in] HDC hdc);
  530.  
  531.     [
  532.     usesgetlasterror,
  533.     entry("SetBkMode"),
  534.     helpstring("Set the background mode of a DC"),
  535.     ]
  536.     int     WINAPI SetBkMode([in] HDC hdc, [in] int fnBkMode);
  537.  
  538.     [
  539.     usesgetlasterror,
  540.     entry("GetBkMode"),
  541.     helpstring("Get the background mode of a DC"),
  542.     ]
  543.     int     WINAPI GetBkMode([in] HDC hdc);
  544.  
  545.     /*
  546.     UINT    WINAPI SetTextAlign([in] HDC hdc, UINT);
  547.     UINT    WINAPI GetTextAlign([in] HDC hdc);
  548.  
  549.     int     WINAPI SetTextCharacterExtra([in] HDC hdc, int);
  550.     int     WINAPI GetTextCharacterExtra([in] HDC hdc);
  551.  
  552.     int     WINAPI SetTextJustification([in] HDC hdc, int, int);
  553.     */
  554.  
  555.     // ****** Omit Font support ******
  556.  
  557.     // ****** Bitmap support ************
  558.  
  559.     /*
  560.     typedef struct tagBITMAP
  561.     {
  562.         int     bmType;
  563.         int     bmWidth;
  564.         int     bmHeight;
  565.         int     bmWidthBytes;
  566.         BYTE    bmPlanes;
  567.         BYTE    bmBitsPixel;
  568.         void FAR * bmBits;
  569.     } BITMAP;
  570.     typedef BITMAP*       PBITMAP;
  571.     typedef BITMAP NEAR * NPBITMAP;
  572.     typedef BITMAP FAR *  LPBITMAP;
  573.  
  574.     // Bitmap Header structures
  575.     typedef struct tagRGBTRIPLE
  576.     {
  577.         BYTE    rgbtBlue;
  578.         BYTE    rgbtGreen;
  579.         BYTE    rgbtRed;
  580.     } RGBTRIPLE;
  581.     typedef RGBTRIPLE FAR * LPRGBTRIPLE;
  582.  
  583.     typedef struct tagRGBQUAD
  584.     {
  585.         BYTE    rgbBlue;
  586.         BYTE    rgbGreen;
  587.         BYTE    rgbRed;
  588.         BYTE    rgbReserved;
  589.     } RGBQUAD;
  590.     typedef RGBQUAD FAR * LPRGBQUAD;
  591.  
  592.     // structures for defining DIBs
  593.     typedef struct tagBITMAPCOREHEADER
  594.     {
  595.         DWORD   bcSize;
  596.         short   bcWidth;
  597.         short   bcHeight;
  598.         WORD    bcPlanes;
  599.         WORD    bcBitCount;
  600.     } BITMAPCOREHEADER;
  601.     typedef BITMAPCOREHEADER*      PBITMAPCOREHEADER;
  602.     typedef BITMAPCOREHEADER FAR * LPBITMAPCOREHEADER;
  603.  
  604.     typedef struct tagBITMAPINFOHEADER
  605.     {
  606.         DWORD   biSize;
  607.         LONG    biWidth;
  608.         LONG    biHeight;
  609.         WORD    biPlanes;
  610.         WORD    biBitCount;
  611.         DWORD   biCompression;
  612.         DWORD   biSizeImage;
  613.         LONG    biXPelsPerMeter;
  614.         LONG    biYPelsPerMeter;
  615.         DWORD   biClrUsed;
  616.         DWORD   biClrImportant;
  617.     } BITMAPINFOHEADER;
  618.     typedef BITMAPINFOHEADER*      PBITMAPINFOHEADER;
  619.     typedef BITMAPINFOHEADER FAR * LPBITMAPINFOHEADER;
  620.  
  621.     typedef struct tagBITMAPINFO
  622.     {
  623.         BITMAPINFOHEADER bmiHeader;
  624.         RGBQUAD      bmiColors[1];
  625.     } BITMAPINFO;
  626.     typedef BITMAPINFO*     PBITMAPINFO;
  627.     typedef BITMAPINFO FAR * LPBITMAPINFO;
  628.  
  629.     typedef struct tagBITMAPCOREINFO
  630.     {
  631.         BITMAPCOREHEADER bmciHeader;
  632.         RGBTRIPLE        bmciColors[1];
  633.     } BITMAPCOREINFO;
  634.     typedef BITMAPCOREINFO*      PBITMAPCOREINFO;
  635.     typedef BITMAPCOREINFO FAR * LPBITMAPCOREINFO;
  636.  
  637.     typedef struct tagBITMAPFILEHEADER
  638.     {
  639.         UINT    bfType;
  640.         DWORD   bfSize;
  641.         UINT    bfReserved1;
  642.         UINT    bfReserved2;
  643.         DWORD   bfOffBits;
  644.     } BITMAPFILEHEADER;
  645.     typedef BITMAPFILEHEADER*      PBITMAPFILEHEADER;
  646.     typedef BITMAPFILEHEADER FAR * LPBITMAPFILEHEADER;
  647.  
  648.  
  649.     HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR * );
  650.  
  651.     HBITMAP WINAPI CreateDiscardableBitmap([in] HDC hdc, int, int);
  652.     HBITMAP WINAPI CreateDIBitmap([in] HDC hdc, BITMAPINFOHEADER FAR *, DWORD, const void FAR *, BITMAPINFO FAR *, UINT);
  653.  
  654.     HBITMAP WINAPI LoadBitmap([in] HINSTANCE hInst, LPCSTR);
  655.  
  656.     */
  657.  
  658.     [
  659.     usesgetlasterror,
  660.     entry("CreateCompatibleBitmap"),
  661.     helpstring("Creates a bitmap of the given size compatible with the given DC"),
  662.     ]
  663.     HBITMAP WINAPI CreateCompatibleBitmap([in] HDC hdc,
  664.                                           [in] int nWidth,
  665.                                           [in] int nHeight);
  666.  
  667.     [
  668.     usesgetlasterror,
  669.     entry("CreateBitmap"),
  670.     helpstring("Creates a device independent memory bitmap with the given width, height, and bit data"),
  671.     ]
  672.     HBITMAP WINAPI CreateBitmap([in] int nWidth, [in] int nHeight,
  673.                                 [in] UINT cbPlanes, [in] UINT cbBits,
  674.                                 [in] DWORD lpvBits);
  675.  
  676.     [
  677.     usesgetlasterror,
  678.     entry("BitBlt"),
  679.     helpstring("Combines source, destination, and pattern of two DCs according to ROP mode"),
  680.     ]
  681.     BOOL    WINAPI BitBlt([in] HDC hdcDest,
  682.                           [in] int nXDest, [in] int nYDest,
  683.                           [in] int nWidth, [in] int nHeight,
  684.                           [in] HDC hdcSrc,
  685.                           [in] int nXSrc, [in] int nYSrc,
  686.                           [in] DWORD dwRop);
  687.  
  688.     [
  689.     usesgetlasterror,
  690.     entry("PatBlt"),
  691.     helpstring("Combines select brush and destination pattern on DC according to ROP mode"),
  692.     ]
  693.     BOOL    WINAPI PatBlt([in] HDC hdc,
  694.                           [in] int nLeftRect, [in] int nTopRect,
  695.                           [in] int nWidth, [in] int nHeight,
  696.                           [in] DWORD fdwRop);
  697.  
  698.     [
  699.     usesgetlasterror,
  700.     entry("StretchBlt"),
  701.     helpstring("Combines select brush and destination pattern on DC according to ROP mode while changing size"),
  702.     ]
  703.     BOOL    WINAPI StretchBlt([in] HDC hdcDest,
  704.                               [in] int nXOriginDest, [in] int nYOriginDest,
  705.                               [in] int bWidthDest, [in] int nHeightDest,
  706.                               [in] HDC hdcSrc,
  707.                               [in] int nXOriginSrc, [in] int nYOriginSrc,
  708.                               [in] int nWidthSrc, [in] int nHeightSrc,
  709.                               [in] DWORD dwRop);
  710.  
  711.     #ifdef WIN32
  712.  
  713.     [
  714.     usesgetlasterror,
  715.     entry("PlgBlt"),
  716.     helpstring("Combines source, destination, and pattern of two DCs according to ROP mode"),
  717.     ]
  718.     BOOL    WINAPI PlgBlt([in] HDC hdcDest,
  719.                           [in, out] WORD FAR * lpPoint,
  720.                           [in] HDC hdcSrc,
  721.                           [in] int nXSrc, [in] int nYSrc,
  722.                           [in] int nWidth, [in] int nHeight,
  723.                           [in] HBITMAP hbmMask,
  724.                           [in] int sMask, [in] int yMask);
  725.  
  726.     [
  727.     usesgetlasterror,
  728.     entry("MaskBlt"),
  729.     helpstring("Combines source and destination of two DCs with a monochrome bitmap mask according to combined foreground and background ROP modes"),
  730.     ]
  731.     BOOL    WINAPI MaskBlt([in] HDC hdcDest,
  732.                            [in] int nXDest, [in] int nYDest,
  733.                            [in] int nWidth, [in] int nHeight,
  734.                            [in] HDC hdcSrc,
  735.                            [in] int nXSrc, [in] int nYSrc,
  736.                            [in] HBITMAP hbmMask,
  737.                            [in] int xMask, [in] int yMask,
  738.                            [in] DWORD dwRop);
  739.  
  740.     #endif
  741.  
  742.     /*
  743.     int     WINAPI StretchDIBits([in] HDC hdc, int, int, int, int, int,
  744.                             int, int, int, const void FAR *, LPBITMAPINFO, UINT, DWORD);
  745.  
  746.     */
  747.  
  748.     [
  749.     usesgetlasterror,
  750.     entry("SetPixel"),
  751.     helpstring("Sets pixel at (x,y) to given color"),
  752.     ]
  753.     COLORREF WINAPI SetPixel([in] HDC hdc,
  754.                              [in] int nXPos, [in] int nYPos,
  755.                              [in] COLORREF clrref);
  756.  
  757.     [
  758.     usesgetlasterror,
  759.     entry("GetPixel"),
  760.     helpstring("Returns color of pixel at (x,y)"),
  761.     ]
  762.     COLORREF WINAPI GetPixel([in] HDC hdc,
  763.                              [in] int nXPos, [in] int nYPos);
  764.  
  765.     [
  766.     usesgetlasterror,
  767.     entry("SetStretchBltMode"),
  768.     helpstring("Sets the mode for compressing blits (see STRETCH_ANDSCANS)"),
  769.     ]
  770.     int     WINAPI SetStretchBltMode([in] HDC hdc, [in] int fnStretchMode);
  771.  
  772.     [
  773.     usesgetlasterror,
  774.     entry("GetStretchBltMode"),
  775.     helpstring("Gets the mode for compressing blits (see STRETCH_ANDSCANS)"),
  776.     ]
  777.     int     WINAPI GetStretchBltMode([in] HDC hdc);
  778.  
  779.     /*
  780.     DWORD   WINAPI SetBitmapDimension([in] HBITMAP hbm, int, int);
  781.     DWORD   WINAPI GetBitmapDimension([in] HBITMAP hbm);
  782.     BOOL    WINAPI SetBitmapDimensionEx([in] HBITMAP hbm, int, int, SIZE FAR *);
  783.     BOOL    WINAPI GetBitmapDimensionEx([in] HBITMAP hbm, SIZE FAR *);
  784.     int     WINAPI SetROP2([in] HDC hdc, int);
  785.     int     WINAPI GetROP2([in] HDC hdc);
  786.     */
  787.  
  788.     [
  789.     usesgetlasterror,
  790.     entry("SetBitmapBits"),
  791.     helpstring("Gets version numbers of Windows and MS-DOS"),
  792.     ]
  793.     LONG    WINAPI SetBitmapBits([in] HBITMAP hbm, [in] LONG cbBuffer, [out] BYTE FAR * lpvBits);
  794.  
  795.     [
  796.     usesgetlasterror,
  797.     entry("GetBitmapBits"),
  798.     helpstring("Fills buffer with bits from the specified bitmap"),
  799.     ]
  800.     LONG    WINAPI GetBitmapBits([in] HBITMAP hbm, [in] LONG cbBuffer, [in] BYTE FAR * lpvBits);
  801.  
  802.     /*
  803.     int     WINAPI SetDIBits([in] HDC hdc, [in] HBITMAP hbm, UINT, UINT, const void FAR *, BITMAPINFO FAR *, UINT);
  804.     int     WINAPI GetDIBits([in] HDC hdc, [in] HBITMAP hbm, UINT, UINT, void FAR *, BITMAPINFO FAR *, UINT);
  805.  
  806.     int     WINAPI SetDIBitsToDevice([in] HDC hdc, int, int, int, int, int, int, UINT, UINT,
  807.                         void FAR *, BITMAPINFO FAR *, UINT);
  808.     */
  809.  
  810.     // ****** Metafile support *****
  811.  
  812.     [
  813.     #if WIN32
  814.     usesgetlasterror,
  815.     entry("CreateMetaFileA"),
  816.     #else
  817.     entry("CreateMetaFile"),
  818.     #endif
  819.     helpstring("Returns a metafile HDC for lpszFile (or for a memory metafile if NULL)"),
  820.     ]
  821.     HDC     WINAPI CreateMetaFile([in] LPCSTR lpszFile);
  822.  
  823.     [
  824.     usesgetlasterror,
  825.     entry("CloseMetaFile"),
  826.     helpstring("Closes metafile HDC and returns a metafile handle"),
  827.     ]
  828.     HMETAFILE WINAPI CloseMetaFile([in] HDC hdc);
  829.  
  830.     [
  831.     usesgetlasterror,
  832.     entry("DeleteMetaFile"),
  833.     helpstring("Invalidates the metafile handle"),
  834.     ]
  835.     BOOL      WINAPI DeleteMetaFile([in] HMETAFILE hmf);
  836.  
  837.     [
  838.     usesgetlasterror,
  839.     entry("PlayMetaFile"),
  840.     helpstring("Plays hmf metafile on hdc device"),
  841.     ]
  842.     BOOL    WINAPI PlayMetaFile([in] HDC hdc, [in] HMETAFILE hmf);
  843.  
  844.     [
  845.     #if WIN32
  846.     usesgetlasterror,
  847.     entry("GetMetaFileA"),
  848.     #else
  849.     entry("GetMetaFile"),
  850.     #endif
  851.     helpstring("Creates handle for lpszFile metafile"),
  852.     ]
  853.     HMETAFILE WINAPI GetMetaFile([in] LPCSTR lpszFile);
  854.  
  855.     [
  856.     #if WIN32
  857.     usesgetlasterror,
  858.     entry("CopyMetaFileA"),
  859.     #else
  860.     entry("CopyMetaFile"),
  861.     #endif
  862.     helpstring("Copies source metafile to a file and returns handle of new metafile"),
  863.     ]
  864.     HMETAFILE WINAPI CopyMetaFile([in] HMETAFILE hmfSrc,
  865.                                   [in] LPCSTR lpszFile);
  866.  
  867. #if WIN32
  868.     [
  869.     usesgetlasterror,
  870.     entry("GetMetaFileBitsEx"),
  871.     helpstring("Returns global memory containing metafile as bits"),
  872.     ]
  873.     UINT  WINAPI GetMetaFileBitsEx([in] HMETAFILE hmf, [in] UINT nSize, 
  874.                                    [in] LPVOID lpvData);
  875.  
  876.     [
  877.     usesgetlasterror,
  878.     entry("SetMetaFileBitsEx"),
  879.     helpstring("Creates a metafile from global memory"),
  880.     ]
  881.     HMETAFILE   WINAPI SetMetaFileBitsEx([in] UINT nSize, [in] LPVOID lpData);
  882. #else
  883.     [
  884.     usesgetlasterror,
  885.     entry("GetMetaFileBits"),
  886.     helpstring("Returns global memory handle of metafile as bits"),
  887.     ]
  888.     HGLOBAL WINAPI GetMetaFileBits([in] HMETAFILE hmf);
  889.  
  890.     [
  891.     usesgetlasterror,
  892.     entry("SetMetaFileBitsEx"),
  893.     helpstring("Creates a metafile from data of global memory handle"),
  894.     ]
  895.     HMETAFILE WINAPI SetMetaFileBits([in] HGLOBAL hgb);
  896.  
  897.     [
  898.     usesgetlasterror,
  899.     entry("SetMetaFileBitsBetter"),
  900.     helpstring("Creates a metafile from data of global memory handle owned by GDI (use for OLE)"),
  901.     ]
  902.     HMETAFILE WINAPI SetMetaFileBitsBetter([in] HGLOBAL hgb);
  903. #endif
  904.  
  905.     /*
  906.     DECLARE_HANDLE(HMETAFILE);
  907.  
  908.     // Clipboard Metafile Picture Structure
  909.     typedef struct tagMETAFILEPICT
  910.     {
  911.         int     mm;
  912.         int     xExt;
  913.         int     yExt;
  914.         HMETAFILE hMF;
  915.     } METAFILEPICT;
  916.     typedef METAFILEPICT FAR * LPMETAFILEPICT;
  917.  
  918.     typedef struct tagMETAHEADER
  919.     {
  920.         UINT    mtType;
  921.         UINT    mtHeaderSize;
  922.         UINT    mtVersion;
  923.         DWORD   mtSize;
  924.         UINT    mtNoObjects;
  925.         DWORD   mtMaxRecord;
  926.         UINT    mtNoParameters;
  927.     } METAHEADER;
  928.  
  929.     typedef struct tagHANDLETABLE
  930.     {
  931.         HGDIOBJ objectHandle[1];
  932.     } HANDLETABLE;
  933.     typedef HANDLETABLE*      PHANDLETABLE;
  934.     typedef HANDLETABLE FAR * LPHANDLETABLE;
  935.  
  936.     typedef struct tagMETARECORD
  937.     {
  938.         DWORD   rdSize;
  939.         UINT    rdFunction;
  940.         UINT    rdParm[1];
  941.     } METARECORD;
  942.     typedef METARECORD*      PMETARECORD;
  943.     typedef METARECORD FAR * LPMETARECORD;
  944.  
  945.     void    WINAPI PlayMetaFileRecord([in] HDC hdc, HANDLETABLE FAR *, METARECORD FAR *, UINT);
  946.     */
  947.  
  948.     /* Omitted
  949.     typedef int (CALLBACK* MFENUMPROC)([in] HDC hdc, HANDLETABLE FAR *, METARECORD FAR *, int, LPARAM);
  950.     BOOL    WINAPI EnumMetaFile([in] HDC hdc, [in] HMETAFILE hmf, MFENUMPROC, LPARAM);
  951.     */
  952.  
  953.     // ****** Enhanced Metafile support *****
  954.  
  955.     #if WIN32
  956.     [
  957.     usesgetlasterror,
  958.     entry("CloseEnhMetaFile"),
  959.     helpstring("Closes an enhanced-metafile device context and returns a handle to the metafile."),
  960.     ]
  961.     HENHMETAFILE WINAPI CloseEnhMetaFile([in] HDC hdc);
  962.     
  963.     [
  964.     usesgetlasterror,
  965.     entry("CopyEnhMetaFileA"),
  966.     helpstring("Copies contents of enhanced-format metafile to specified file."),
  967.     ]
  968.     HENHMETAFILE WINAPI CopyEnhMetaFile([in] HENHMETAFILE hemf, 
  969.                                         [in] LPCSTR lpszFile);
  970.     
  971.     [
  972.     usesgetlasterror,
  973.     entry("CreateEnhMetaFileA"),
  974.     helpstring("Creates device context for enhanced-format metafile."),
  975.     ]
  976.     HDC   WINAPI CreateEnhMetaFile([in] HDC hdc, [in] LPCSTR lpFileName, 
  977.                                    [in] int * lpRect, 
  978.                                    [in] LPCSTR lpDescription);
  979.     
  980.     [
  981.     usesgetlasterror,
  982.     entry("DeleteEnhMetaFile"),
  983.     helpstring("Deletes an enhanced-format metafile or metafile handle."),
  984.     ]
  985.     BOOL  WINAPI DeleteEnhMetaFile([in] HENHMETAFILE hemf);
  986.     
  987.     /*
  988.     BOOL  WINAPI EnumEnhMetaFile([in] HDC hdc, [in] HENHMETAFILE hemf, ENHMFENUMPROC,
  989.             LPVOID, CONST RECT *);
  990.     */
  991.     
  992.     [
  993.     usesgetlasterror,
  994.     entry("GetEnhMetaFileA"),
  995.     helpstring("Creates handle for given file-based enhanced-format metafile"),
  996.     ]
  997.     HENHMETAFILE WINAPI GetEnhMetaFile([in] LPCSTR lpszMetaFile);
  998.  
  999.     [
  1000.     usesgetlasterror,
  1001.     entry("GetEnhMetaFileBits"),
  1002.     helpstring("Copies contents of specified enhanced-format metafile into buffer"),
  1003.     ]
  1004.     UINT  WINAPI GetEnhMetaFileBits([in] HENHMETAFILE hemf, 
  1005.                                     [in] UINT cbBuffer, 
  1006.                                     [out] BYTE * lpbBuffer);
  1007.  
  1008.     [
  1009.     usesgetlasterror,
  1010.     entry("GetEnhMetaFileDescriptionA"),
  1011.     helpstring("Copies optional text description from an enhanced-format metafile to a specified buffer.")
  1012.     ]
  1013.     UINT  WINAPI GetEnhMetaFileDescription([in] HENHMETAFILE hemf, 
  1014.                                            [in] UINT cchBuffer, 
  1015.                                            [out] LPSTR lpszDescription);
  1016.  
  1017.     /*
  1018.     [
  1019.     usesgetlasterror,
  1020.     entry("GetEnhMetaFileHeader"),
  1021.     helpstring(""),
  1022.     ]
  1023.     UINT  WINAPI GetEnhMetaFileHeader([in] HENHMETAFILE hemf, 
  1024.                                       [in] UINT cbBuffer, 
  1025.                                       [in] LPENHMETAHEADER lpemnh);
  1026.  
  1027.     [
  1028.     usesgetlasterror,
  1029.     entry("GetEnhMetaFilePaletteEntries"),
  1030.     helpstring(""),
  1031.     ]
  1032.     UINT  WINAPI GetEnhMetaFilePaletteEntries([in] HENHMETAFILE hemf, 
  1033.                                               UINT, 
  1034.                                               LPPALETTEENTRY );
  1035.     */
  1036.  
  1037.     [
  1038.     usesgetlasterror,
  1039.     entry("GetWinMetaFileBits"),
  1040.     helpstring("Converts enhanced-format records from metafile into Windows-format records and copies converted records to specified buffer."),
  1041.     ]
  1042.     UINT  WINAPI GetWinMetaFileBits([in] HENHMETAFILE hemf, 
  1043.                                     [in] UINT cbBuffer, 
  1044.                                     [out] BYTE * lpbBuffer, 
  1045.                                     [in] INT fnMapMode, 
  1046.                                     [in] HDC hdc);
  1047.  
  1048.     [
  1049.     usesgetlasterror,
  1050.     entry("PlayEnhMetaFile"),
  1051.     helpstring("Displays the picture in specified enhanced-format metafile."),
  1052.     ]
  1053.     BOOL  WINAPI PlayEnhMetaFile([in] HDC hdc, [in] HENHMETAFILE hemf, 
  1054.                                  [in] int * lpRect);
  1055.  
  1056.     /*
  1057.     [
  1058.     usesgetlasterror,
  1059.     entry("PlayEnhMetaFileRecord"),
  1060.     helpstring(""),
  1061.     ]
  1062.     BOOL  WINAPI PlayEnhMetaFileRecord([in] HDC hdc, LPHANDLETABLE, CONST ENHMETARECORD *, UINT);
  1063.     */
  1064.  
  1065.     [
  1066.     usesgetlasterror,
  1067.     entry("SetEnhMetaFileBits"),
  1068.     helpstring("Creates memory-based enhanced-format metafile from supplied data."),
  1069.     ]
  1070.     HENHMETAFILE WINAPI SetEnhMetaFileBits([in] UINT cbBuffer, 
  1071.                                            [out] BYTE * lpData);
  1072.  
  1073.     /*
  1074.     [
  1075.     usesgetlasterror,
  1076.     entry("SetWinMetaFileBits"),
  1077.     helpstring(""),
  1078.     ]
  1079.     HENHMETAFILE  WINAPI SetWinMetaFileBits([in] UINT cbBuffer, 
  1080.                                             [in] BYTE * lpbBuffer, 
  1081.                                             [in] HDC hdc, 
  1082.                                             [in] long * lpmfp);
  1083.     */
  1084.  
  1085.     [
  1086.     usesgetlasterror,
  1087.     entry("GdiComment"),
  1088.     helpstring("Copies a comment from a buffer into specified enhanced-format metafile."),
  1089.     ]
  1090.     BOOL  WINAPI GdiComment([in] HDC hdc, [in] UINT cbSize, 
  1091.                             [in] BYTE * lpData);
  1092.  
  1093.     #endif
  1094.  
  1095.     // ****** Printing support ******
  1096.  
  1097.     /*
  1098.     typedef struct
  1099.     {
  1100.         int     cbSize;
  1101.         LPCSTR  lpszDocName;
  1102.         LPCSTR  lpszOutput;
  1103.     }   DOCINFO;
  1104.     typedef DOCINFO FAR * LPDOCINFO;
  1105.  
  1106.     int     WINAPI StartDoc([in] HDC hdc, DOCINFO FAR *);
  1107.     int     WINAPI StartPage([in] HDC hdc);
  1108.     int     WINAPI EndPage([in] HDC hdc);
  1109.     int     WINAPI EndDoc([in] HDC hdc);
  1110.     int     WINAPI AbortDoc([in] HDC hdc);
  1111.     */
  1112.  
  1113.     /* Omitted
  1114.     typedef BOOL (CALLBACK* ABORTPROC)([in] HDC hdc, int);
  1115.     int     WINAPI SetAbortProc([in] HDC hdc, ABORTPROC);
  1116.     */
  1117.  
  1118.     /*
  1119.     HANDLE  WINAPI SpoolFile(LPSTR, LPSTR, LPSTR, LPSTR);
  1120.  
  1121.     BOOL    WINAPI QueryAbort([in] HDC hdc, int);
  1122.  
  1123.     */
  1124.  
  1125.     // ******* GDI Escape support *******
  1126.  
  1127.     /*
  1128.     int     WINAPI Escape([in] HDC hdc, int, int, LPCSTR, void FAR *);
  1129.  
  1130.     */
  1131.  
  1132.     // ******* Path support *******
  1133.  
  1134.     #if WIN32
  1135.     [
  1136.     usesgetlasterror,
  1137.     entry("AbortPath"),
  1138.     helpstring("Closes and discards any paths in the specified device context"),
  1139.     ]
  1140.     BOOL WINAPI AbortPath([in] HDC hDC);
  1141.  
  1142.     [
  1143.     usesgetlasterror,
  1144.     entry("ArcTo"),
  1145.     helpstring("Draws an elliptical arc"),
  1146.     ]
  1147.     BOOL WINAPI ArcTo([in] HDC hDC,
  1148.                       [in] int nLeftRect, [in] int nTopRect,
  1149.                       [in] int nRightRect, [in] int nBottomRect,
  1150.                       [in] int nXRadial1, [in] int nYRadial1,
  1151.                       [in] int nXRadial2, [in] int nYRadial2);
  1152.  
  1153.     [
  1154.     usesgetlasterror,
  1155.     entry("BeginPath"),
  1156.     helpstring("Opens a path bracket in the specified device context"),
  1157.     ]
  1158.     BOOL WINAPI BeginPath([in] HDC hDC);
  1159.  
  1160.     [
  1161.     usesgetlasterror,
  1162.     entry("CloseFigure"),
  1163.     helpstring("Closes an open figure in a path"),
  1164.     ]
  1165.     BOOL WINAPI CloseFigure([in] HDC hDC);
  1166.  
  1167.     [
  1168.     usesgetlasterror,
  1169.     entry("EndPath"),
  1170.     helpstring("Closes a path bracket and selects the path into the specified device context"),
  1171.     ]
  1172.     BOOL WINAPI EndPath([in] HDC hDC);
  1173.  
  1174.     [
  1175.     usesgetlasterror,
  1176.     entry("FillPath"),
  1177.     helpstring("Closes any open figures in the current path and fills the path's interior using the current brush and polygon-filling modes"),
  1178.     ]
  1179.     BOOL WINAPI FillPath([in] HDC hDC);
  1180.  
  1181.     [
  1182.     usesgetlasterror,
  1183.     entry("FlattenPath"),
  1184.     helpstring("Transforms curves in the current path, turning each into a sequence of lines"),
  1185.     ]
  1186.     BOOL WINAPI FlattenPath([in] HDC hDC);
  1187.  
  1188.     [
  1189.     usesgetlasterror,
  1190.     entry("GetPath"),
  1191.     helpstring("Retrieves the coordinates defining the endpoints of lines and the control points of curves found in the current path"),
  1192.     ]
  1193.     int WINAPI GetPath([in] HDC hDC, [in, out] int * lpPoints,
  1194.                        [in, out] BYTE * lpTypes, [in] int nSize);
  1195.  
  1196.     [
  1197.     usesgetlasterror,
  1198.     entry("PathToRegion"),
  1199.     helpstring("Creates a region from the current path"),
  1200.     ]
  1201.     HRGN WINAPI PathToRegion([in] HDC hDC);
  1202.  
  1203.     [
  1204.     usesgetlasterror,
  1205.     entry("PolyDraw"),
  1206.     helpstring("Draws a set of line segments and Bezier curves"),
  1207.     ]
  1208.     BOOL WINAPI PolyDraw([in] HDC hDC, [in] int * lppt,
  1209.                          [in] BYTE * lpbTypes, [in] int cCount);
  1210.  
  1211.     [
  1212.     usesgetlasterror,
  1213.     entry("SelectClipPath"),
  1214.     helpstring("Selects the current path as a clipping region, combining the new region with any existing clipping region by using the specified mode"),
  1215.     ]
  1216.     BOOL WINAPI SelectClipPath([in] HDC hDC, [in] int iMode);
  1217.  
  1218.     [
  1219.     usesgetlasterror,
  1220.     entry("SetArcDirection"),
  1221.     helpstring("Sets the drawing direction to be used for arc and rectangle functions to AD_COUNTERCLOCKWISE or AD_CLOCKWISE"),
  1222.     ]
  1223.     int WINAPI SetArcDirection([in] HDC hDC, [in] int ArcDirection);
  1224.  
  1225.     [
  1226.     usesgetlasterror,
  1227.     entry("SetMiterLimit"),
  1228.     helpstring("Sets the limit for the length of miter joins for the specified device context"),
  1229.     ]
  1230.     BOOL WINAPI SetMiterLimit([in] HDC hDC, [in] FLOAT eNewLimit,
  1231.                               [out] FLOAT * peOldLimit);
  1232.  
  1233.     [
  1234.     usesgetlasterror,
  1235.     entry("StrokeAndFillPath"),
  1236.     helpstring("Strokes the outline of the path with the current pen and fills with the current brush"),
  1237.     ]
  1238.     BOOL WINAPI StrokeAndFillPath([in] HDC hDC);
  1239.  
  1240.     [
  1241.     usesgetlasterror,
  1242.     entry("StrokePath"),
  1243.     helpstring("Strokes the outline of the path with the current pen"),
  1244.     ]
  1245.     BOOL WINAPI StrokePath([in] HDC hDC);
  1246.  
  1247.     [
  1248.     usesgetlasterror,
  1249.     entry("WidenPath"),
  1250.     helpstring("Redefines the current path as the area that would be painted if the path were stroked using the current pen"),
  1251.     ]
  1252.     BOOL WINAPI WidenPath([in] HDC hDC);
  1253.  
  1254.     [
  1255.     usesgetlasterror,
  1256.     entry("GetMiterLimit"),
  1257.     helpstring("Gets the limit for the length of miter joins for the specified device context"),
  1258.     ]
  1259.     BOOL WINAPI GetMiterLimit([in] HDC hDC, [out] FLOAT * peOldLimit);
  1260.  
  1261.  
  1262.     [
  1263.     usesgetlasterror,
  1264.     entry("GetArcDirection"),
  1265.     helpstring("Gets the drawing direction used for arc and rectangle functions (AD_COUNTERCLOCKWISE or AD_CLOCKWISE)"),
  1266.     ]
  1267.     int WINAPI GetArcDirection([in] HDC hDC);
  1268.  
  1269.     // HPEN WINAPI ExtCreatePen(DWORD, DWORD, CONST LOGBRUSH *, DWORD, CONST DWORD *);
  1270.  
  1271.     #endif // WIN32
  1272.  
  1273. }
  1274.  
  1275. [
  1276. uuid(54674045-3A82-101B-8181-00AA003743D3),
  1277. helpstring("Windows GDI Constants"),
  1278. ,
  1279. dllname("NOSUCH.DLL")
  1280. ]
  1281. module GDIConst {
  1282.  
  1283.     // new StretchBlt() Modes (simpler names)
  1284.     [ helpstring("SetStretchBltMode: AND compressed bits (preserve black) for SetStretchBltMode)") ]
  1285.     const int STRETCH_ANDSCANS   = 1;
  1286.     [ helpstring("SetStretchBltMode: OR compressed bits (preserve colored or white) for SetStretchBltMode") ]
  1287.     const int STRETCH_ORSCANS        = 2;
  1288.     [ helpstring("SetStretchBltMode: Delete compressed lines of bits for SetStretchBltMode") ]
  1289.     const int STRETCH_DELETESCANS    = 3;
  1290.  
  1291.     // Ternary raster operations
  1292.     [ helpstring("BitBlt: Copy source bits over destination bits") ]
  1293.     const DWORD SRCCOPY = 0x00CC0020;
  1294.     [ helpstring("BitBlt: OR source bits onto destination") ]
  1295.     const DWORD SRCPAINT    = 0x00EE0086;
  1296.     [ helpstring("BitBlt: AND source bits onto destination") ]
  1297.     const DWORD SRCAND      = 0x008800C6;
  1298.     [ helpstring("BitBlt: XOR source bits onto destination") ]
  1299.     const DWORD SRCINVERT   = 0x00660046;
  1300.     [ helpstring("BitBlt: Invert destination bits, AND the result with source bits") ]
  1301.     const DWORD SRCERASE    = 0x00440328;
  1302.     [ helpstring("BitBlt: Invert source bits, copy to destination") ]
  1303.     const DWORD NOTSRCCOPY  = 0x00330008;
  1304.     [ helpstring("BitBlt: OR source bits onto destination bits, invert result") ]
  1305.     const DWORD NOTSRCERASE = 0x001100A6;
  1306.     [ helpstring("BitBlt: AND source bits onto pattern bits, copy to destination") ]
  1307.     const DWORD MERGECOPY   = 0x00C000CA;
  1308.     [ helpstring("BitBlt: Invert source bits, AND result onto destination") ]
  1309.     const DWORD MERGEPAINT  = 0x00BB0226;
  1310.     [ helpstring("BitBlt: Copy pattern bits over destination bits") ]
  1311.     const DWORD PATCOPY = 0x00F00021;
  1312.     [ helpstring("BitBlt: Invert source bits, OR result with pattern, OR result with destination") ]
  1313.     const DWORD PATPAINT    = 0x00FB0A09;
  1314.     [ helpstring("BitBlt: XOR pattern bits onto destination") ]
  1315.     const DWORD PATINVERT   = 0x005A0049;
  1316.     [ helpstring("BitBlt: Invert destination bits") ]
  1317.     const DWORD DSTINVERT   = 0x00550009;
  1318.     [ helpstring("BitBlt: Turn destination bits black (0)") ]
  1319.     const DWORD BLACKNESS   = 0x00000042;
  1320.     [ helpstring("BitBlt: Turn destination bits white (1)") ]
  1321.     const DWORD WHITENESS   = 0x00FF0062;
  1322.  
  1323.     // ExtFloodFill style flags
  1324.     [ helpstring("ExtFloodFill: Fill to border specified by color") ]
  1325.     const int FLOODFILLBORDER   = 0;
  1326.     [ helpstring("ExtFloodFill: Fill with color, end of color is border") ]
  1327.     const int FLOODFILLSURFACE  = 1;
  1328.  
  1329.     // Device Parameters for GetDeviceCaps()
  1330.     [ helpstring("GetDeviceCaps: Version number") ]
  1331.     const int DRIVERVERSION = 0;
  1332.     [ helpstring("GetDeviceCaps: Device type returns DT_PLOTTER, DT_RASDISPLAY, DT_RASPRINTER, DT_RASCAMERA, DT_CHARSTREAM, DT_METAFILE, or DT_DISPFILE ") ]
  1333.     const int TECHNOLOGY    = 2;
  1334.     [ helpstring("GetDeviceCaps: Width of display in millimeters") ]
  1335.     const int HORZSIZE      = 4;
  1336.     [ helpstring("GetDeviceCaps: Height of display in millimeters") ]
  1337.     const int VERTSIZE      = 6;
  1338.     [ helpstring("GetDeviceCaps: Width of display in pixels") ]
  1339.     const int HORZRES       = 8;
  1340.     [ helpstring("GetDeviceCaps: Height of display in raster lines") ]
  1341.     const int VERTRES       = 10;
  1342.     [ helpstring("GetDeviceCaps: Color bits per pixel") ]
  1343.     const int BITSPIXEL     = 12;
  1344.     [ helpstring("GetDeviceCaps: Color planes") ]
  1345.     const int PLANES        = 14;
  1346.     [ helpstring("GetDeviceCaps: Number of device-specific brushes") ]
  1347.     const int NUMBRUSHES    = 16;
  1348.     [ helpstring("GetDeviceCaps: Number of device-specific pens") ]
  1349.     const int NUMPENS       = 18;
  1350.     [ helpstring("GetDeviceCaps: Number of device-specific markers") ]
  1351.     const int NUMMARKERS    = 20;
  1352.     [ helpstring("GetDeviceCaps: Number of device-specific fonts") ]
  1353.     const int NUMFONTS      = 22;
  1354.     [ helpstring("GetDeviceCaps: Entries in device color table") ]
  1355.     const int NUMCOLORS     = 24;
  1356.     [ helpstring("GetDeviceCaps: Size of PDEVICE structure in bytes") ]
  1357.     const int PDEVICESIZE   = 26;
  1358.     [ helpstring("GetDeviceCaps: Curve capability flags - CC_NONE, CC_CIRCLES, CC_PIE, CC_CHORD, CC_ELLIPSES, CC_WIDE, CC_STYLED, CC_WIDESTYLED, CC_INTERIORS, CC_ROUNDRECT") ]
  1359.     const int CURVECAPS     = 28;
  1360.     [ helpstring("GetDeviceCaps: Line capability flags - LC_NONE, LC_POLYLINE, LC_MARKER, LC_POLYMARKER, LC_WIDE, LC_STYLED, LC_WIDESTYLED, LC_INTERIORS") ]
  1361.     const int LINECAPS      = 30;
  1362.     [ helpstring("GetDeviceCaps: Polygon capability flags - PC_NONE, PC_POLYGON, PC_RECTANGLE, PC_WINDPOLYGON, PC_SCANLINE, PC_WIDE, PC_STYLED, PC_WIDESTYLED, PC_INTERIORS") ]
  1363.     const int POLYGONALCAPS = 32;
  1364.     [ helpstring(
  1365.     "GetDeviceCaps: Text capability flags - TC_OP_STROKE, TC_CR_90, TC_CR_ANY, TC_IA_ABLE, TC_UA_ABLE, TC_SO_ABLE, TC_RA_ABLE, TC_VA_ABLE, Etc.") ]
  1366.     const int TEXTCAPS    = 34;
  1367.     [ helpstring("GetDeviceCaps: Clipping capability flags - CP_NONE, CP_RECTANGLE, CP_REGION") ]
  1368.     const int CLIPCAPS      = 36;
  1369.     [ helpstring(
  1370.     "GetDeviceCaps: Raster capability flags - RC_BITBLT, RC_SCALING, RC_SAVEBITMAP, RC_DI_BITMAP, RC_PALETTE, RC_STRETCHBLT, RC_FLOODFILL, RC_STRETCHDIB, Etc."
  1371.     ) ]
  1372.     const int RASTERCAPS    = 38;
  1373.     [ helpstring("GetDeviceCaps: X Aspect") ]
  1374.     const int ASPECTX       = 40;
  1375.     [ helpstring("GetDeviceCaps: Y Aspect") ]
  1376.     const int ASPECTY       = 42;
  1377.     [ helpstring("GetDeviceCaps: X/Y Aspect") ]
  1378.     const int ASPECTXY      = 44;
  1379.     [ helpstring("GetDeviceCaps: X pixels per logical inch") ]
  1380.     const int LOGPIXELSX    = 88;
  1381.     [ helpstring("GetDeviceCaps: Y pixels per logical inch") ]
  1382.     const int LOGPIXELSY    = 90;
  1383.     [ helpstring("GetDeviceCaps: Entries in system palette") ]
  1384.     const int SIZEPALETTE   = 104;
  1385.     [ helpstring("GetDeviceCaps: Reserved entries in system palette") ]
  1386.     const int NUMRESERVED   = 106;
  1387.     [ helpstring("GetDeviceCaps: Color resolution in bits per pixel") ]
  1388.     const int COLORRES      = 108;
  1389.  
  1390.     // GetDeviceCaps() return value masks
  1391.  
  1392.     // TECHNOLOGY
  1393.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1394.     const int DT_PLOTTER        = 0;
  1395.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1396.     const int DT_RASDISPLAY     = 1;
  1397.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1398.     const int DT_RASPRINTER     = 2;
  1399.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1400.     const int DT_RASCAMERA      = 3;
  1401.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1402.     const int DT_CHARSTREAM     = 4;
  1403.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1404.     const int DT_METAFILE       = 5;
  1405.     [ helpstring("GetDeviceCaps: TECHNOLOGY flag") ]
  1406.     const int DT_DISPFILE       = 6;
  1407.  
  1408.     // CURVECAPS
  1409.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1410.     const UINT CC_NONE          = 0x0000;
  1411.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1412.     const UINT CC_CIRCLES       = 0x0001;
  1413.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1414.     const UINT CC_PIE           = 0x0002;
  1415.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1416.     const UINT CC_CHORD         = 0x0004;
  1417.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1418.     const UINT CC_ELLIPSES      = 0x0008;
  1419.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1420.     const UINT CC_WIDE          = 0x0010;
  1421.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1422.     const UINT CC_STYLED            = 0x0020;
  1423.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1424.     const UINT CC_WIDESTYLED        = 0x0040;
  1425.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1426.     const UINT CC_INTERIORS     = 0x0080;
  1427.     [ helpstring("GetDeviceCaps: CURVECAPS flag") ]
  1428.     const UINT CC_ROUNDRECT     = 0x0100;
  1429.  
  1430.     // LINECAPS
  1431.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1432.     const UINT LC_NONE          = 0x0000;
  1433.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1434.     const UINT LC_POLYLINE      = 0x0002;
  1435.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1436.     const UINT LC_MARKER            = 0x0004;
  1437.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1438.     const UINT LC_POLYMARKER        = 0x0008;
  1439.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1440.     const UINT LC_WIDE          = 0x0010;
  1441.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1442.     const UINT LC_STYLED            = 0x0020;
  1443.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1444.     const UINT LC_WIDESTYLED        = 0x0040;
  1445.     [ helpstring("GetDeviceCaps: LINECAPS flag") ]
  1446.     const UINT LC_INTERIORS     = 0x0080;
  1447.  
  1448.     // POLYGONALCAPS
  1449.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1450.     const UINT PC_NONE          = 0x0000;
  1451.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1452.     const UINT PC_POLYGON       = 0x0001;
  1453.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1454.     const UINT PC_RECTANGLE     = 0x0002;
  1455.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1456.     const UINT PC_WINDPOLYGON   = 0x0004;
  1457.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1458.     const UINT PC_SCANLINE      = 0x0008;
  1459.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1460.     const UINT PC_WIDE          = 0x0010;
  1461.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1462.     const UINT PC_STYLED        = 0x0020;
  1463.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1464.     const UINT PC_WIDESTYLED    = 0x0040;
  1465.     [ helpstring("GetDeviceCaps: POLYCONALCAPS flag") ]
  1466.     const UINT PC_INTERIORS     = 0x0080;
  1467.  
  1468.     // TEXTCAPS
  1469.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1470.     const UINT TC_OP_CHARACTER  = 0x0001;
  1471.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1472.     const UINT TC_OP_STROKE     = 0x0002;
  1473.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1474.     const UINT TC_CP_STROKE     = 0x0004;
  1475.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1476.     const UINT TC_CR_90         = 0x0008;
  1477.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1478.     const UINT TC_CR_ANY        = 0x0010;
  1479.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1480.     const UINT TC_SF_X_YINDEP   = 0x0020;
  1481.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1482.     const UINT TC_SA_DOUBLE     = 0x0040;
  1483.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1484.     const UINT TC_SA_INTEGER    = 0x0080;
  1485.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1486.     const UINT TC_SA_CONTIN     = 0x0100;
  1487.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1488.     const UINT TC_EA_DOUBLE     = 0x0200;
  1489.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1490.     const UINT TC_IA_ABLE       = 0x0400;
  1491.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1492.     const UINT TC_UA_ABLE       = 0x0800;
  1493.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1494.     const UINT TC_SO_ABLE       = 0x1000;
  1495.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1496.     const UINT TC_RA_ABLE       = 0x2000;
  1497.     [ helpstring("GetDeviceCaps: TEXTCAPS flag") ]
  1498.     const UINT TC_VA_ABLE       = 0x4000;
  1499.  
  1500.     // CLIPCAPS
  1501.     [ helpstring("GetDeviceCaps: CLIPCAPS flag") ]
  1502.     const UINT CP_NONE          = 0x0000;
  1503.     [ helpstring("GetDeviceCaps: CLIPCAPS flag") ]
  1504.     const UINT CP_RECTANGLE     = 0x0001;
  1505.     [ helpstring("GetDeviceCaps: CLIPCAPS flag") ]
  1506.     const UINT CP_REGION        = 0x0002;
  1507.  
  1508.     // RASTERCAPS
  1509.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1510.     const UINT RC_BITBLT        = 0x0001;
  1511.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1512.     const UINT RC_BANDING       = 0x0002;
  1513.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1514.     const UINT RC_SCALING       = 0x0004;
  1515.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1516.     const UINT RC_BITMAP64      = 0x0008;
  1517.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1518.     const UINT RC_GDI20_OUTPUT  = 0x0010;
  1519.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1520.     const UINT RC_GDI20_STATE   = 0x0020;
  1521.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1522.     const UINT RC_SAVEBITMAP    = 0x0040;
  1523.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1524.     const UINT RC_DI_BITMAP     = 0x0080;
  1525.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1526.     const UINT RC_PALETTE       = 0x0100;
  1527.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1528.     const UINT RC_DIBTODEV      = 0x0200;
  1529.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1530.     const UINT RC_BIGFONT       = 0x0400;
  1531.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1532.     const UINT RC_STRETCHBLT    = 0x0800;
  1533.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1534.     const UINT RC_FLOODFILL     = 0x1000;
  1535.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1536.     const UINT RC_STRETCHDIB    = 0x2000;
  1537.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1538.     const UINT RC_OP_DX_OUTPUT  = 0x4000;
  1539.     [ helpstring("GetDeviceCaps: RASTERCAPS flag") ]
  1540.     const UINT RC_DEVBITS       = H8000; // Hack to get 0x8000
  1541.  
  1542.     [ helpstring("GetDeviceCaps: Other capability flags - C1_TRANSPARENT") ]
  1543.     const int CAPS1         = 94;
  1544.     [ helpstring("GetDeviceCaps: CAPS1 transparency flag") ]
  1545.     const UINT C1_TRANSPARENT   = 0x0001;   // new raster cap
  1546.  
  1547.     // const int QUERYROPSUPPORT    = 40    // use to determine ROP support
  1548.  
  1549.     // Background Modes
  1550.     [ helpstring("Get/SetBkMode: Transparent background") ]
  1551.     const int TRANSPARENT    = 1;
  1552.     [ helpstring("Get/SetBkMode: Opaque background") ]
  1553.     const int OPAQUE         = 2;
  1554.     [ helpstring("Get/SetBkMode: Transparent background for blits (requires C1_TRANSPARENT device capability)") ]
  1555.     const int NEWTRANSPARENT = 3;
  1556.  
  1557.     [ helpstring("SetArcDirection: Draw arc or rectangle counterclockwise") ]
  1558.     const UINT AD_COUNTERCLOCKWISE = 1;
  1559.     [ helpstring("SetArcDirection: Draw arc or rectangle clockwise") ]
  1560.     const UINT AD_CLOCKWISE        = 2;
  1561.  
  1562.     //const UINT DCB_RESET      = 0x0001;
  1563.     //const UINT DCB_ACCUMULATE = 0x0002;
  1564.     //const UINT DCB_DIRTY      = 0x0002;
  1565.     //const UINT DCB_SET        = 0x0003;
  1566.     //const UINT DCB_ENABLE = 0x0004;
  1567.     //const UINT DCB_DISABLE    = 0x0008;
  1568.  
  1569.     // Map modes
  1570.     //const int MM_TEXT         = 1;
  1571.     //const int MM_LOMETRIC     = 2;
  1572.     //const int MM_HIMETRIC     = 3;
  1573.     //const int MM_LOENGLISH        = 4;
  1574.     //const int MM_HIENGLISH        = 5;
  1575.     //const int MM_TWIPS            = 6;
  1576.     //const int MM_ISOTROPIC        = 7;
  1577.     //const int MM_ANISOTROPIC  = 8;
  1578.  
  1579.     // Coordinate Modes
  1580.     const int ABSOLUTE                    = 1;
  1581.     const int RELATIVE                    = 2;
  1582.  
  1583.     // Pen Styles
  1584.     const int PS_SOLID          = 0;
  1585.     const int PS_DASH           = 1;
  1586.     const int PS_DOT            = 2;
  1587.     const int PS_DASHDOT        = 3;
  1588.     const int PS_DASHDOTDOT     = 4;
  1589.     const int PS_NULL           = 5;
  1590.     const int PS_INSIDEFRAME    = 6;
  1591.  
  1592.     // Palette entry flags
  1593.     //const int PC_RESERVED = 0x01; // palette index used for animation
  1594.     //const int PC_EXPLICIT = 0x02; // palette index is explicit to device
  1595.     //const int PC_NOCOLLAPSE   = 0x04; // do not match color to system palette
  1596.  
  1597.     // Get/SetSystemPaletteUse() values
  1598.     //const int SYSPAL_STATIC   = 1;
  1599.     //const int SYSPAL_NOSTATIC = 2;
  1600.  
  1601.     // Brush Styles
  1602.     const int BS_SOLID          = 0;
  1603.     const int BS_NULL           = 1;
  1604.     const int BS_HOLLOW         = 1;
  1605.     const int BS_HATCHED        = 2;
  1606.     const int BS_PATTERN        = 3;
  1607.     const int BS_INDEXED        = 4;
  1608.     const int BS_DIBPATTERN     = 5;
  1609.  
  1610.     // Hatch Styles
  1611.     const int HS_HORIZONTAL     = 0;
  1612.     const int HS_VERTICAL       = 1;
  1613.     const int HS_FDIAGONAL      = 2;
  1614.     const int HS_BDIAGONAL      = 3;
  1615.     const int HS_CROSS          = 4;
  1616.     const int HS_DIAGCROSS      = 5;
  1617.  
  1618.     // Stock brushes for use with GetStockObject()
  1619.     const int WHITE_BRUSH       = 0;
  1620.     const int LTGRAY_BRUSH      = 1;
  1621.     const int GRAY_BRUSH        = 2;
  1622.     const int DKGRAY_BRUSH      = 3;
  1623.     const int BLACK_BRUSH       = 4;
  1624.     const int NULL_BRUSH        = 5;
  1625.     const int HOLLOW_BRUSH      = 5;
  1626.  
  1627.     // Stock pens for use with GetStockObject();
  1628.     const int WHITE_PEN         = 6;
  1629.     const int BLACK_PEN         = 7;
  1630.     const int NULL_PEN          = 8;
  1631.  
  1632.     // Region type flags
  1633.     //const int ERROR               = 0;
  1634.     //const int NULLREGION      = 1;
  1635.     //const int SIMPLEREGION        = 2;
  1636.     //const int COMPLEXREGION       = 3;
  1637.  
  1638.     // CombineRgn() command values
  1639.     //const int RGN_AND         = 1;
  1640.     //const int RGN_OR          = 2;
  1641.     //const int RGN_XOR         = 3;
  1642.     //const int RGN_DIFF            = 4;
  1643.     //const int RGN_COPY            = 5;
  1644.  
  1645.     // Object types for EnumObjects()
  1646.     const int OBJ_PEN       = 1;
  1647.     const int OBJ_BRUSH     = 2;
  1648.  
  1649.     // DrawText() Format Flags
  1650.     const UINT DT_TOP       = 0x0000;
  1651.     const UINT DT_LEFT      = 0x0000;
  1652.     const UINT DT_CENTER        = 0x0001;
  1653.     const UINT DT_RIGHT     = 0x0002;
  1654.     const UINT DT_VCENTER   = 0x0004;
  1655.     const UINT DT_BOTTOM        = 0x0008;
  1656.     const UINT DT_WORDBREAK = 0x0010;
  1657.     const UINT DT_SINGLELINE    = 0x0020;
  1658.     const UINT DT_EXPANDTABS    = 0x0040;
  1659.     const UINT DT_TABSTOP   = 0x0080;
  1660.     const UINT DT_NOCLIP        = 0x0100;
  1661.     const UINT DT_EXTERNALLEADING  = 0x0200;
  1662.     const UINT DT_CALCRECT  = 0x0400;
  1663.     const UINT DT_NOPREFIX  = 0x0800;
  1664.     const UINT DT_INTERNAL  = 0x1000;
  1665.  
  1666.     // Text Alignment Options
  1667.     const UINT TA_NOUPDATECP = 0x0000;
  1668.     const UINT TA_UPDATECP  = 0x0001;
  1669.     const UINT TA_LEFT      = 0x0000;
  1670.     const UINT TA_RIGHT     = 0x0002;
  1671.     const UINT TA_CENTER    = 0x0006;
  1672.     const UINT TA_TOP       = 0x0000;
  1673.     const UINT TA_BOTTOM    = 0x0008;
  1674.     const UINT TA_BASELINE  = 0x0018;
  1675.  
  1676.     // constants for the biCompression field
  1677.     const long BI_RGB   = 0;
  1678.     const long BI_RLE8  = 1;
  1679.     const long BI_RLE4  = 2;
  1680.  
  1681.     // DIB color table identifiers
  1682.     const int DIB_RGB_COLORS  = 0;
  1683.     const int DIB_PAL_COLORS  = 1;
  1684.  
  1685.     // constants for CreateDIBitmap
  1686.     //const DWORD CBM_INIT       = 0x00000004;
  1687.  
  1688.     // Binary raster ops
  1689.     const int R2_BLACK           = 1;
  1690.     const int R2_NOTMERGEPEN     = 2;
  1691.     const int R2_MASKNOTPEN      = 3;
  1692.     const int R2_NOTCOPYPEN      = 4;
  1693.     const int R2_MASKPENNOT      = 5;
  1694.     const int R2_NOT             = 6;
  1695.     const int R2_XORPEN          = 7;
  1696.     const int R2_NOTMASKPEN      = 8;
  1697.     const int R2_MASKPEN         = 9;
  1698.     const int R2_NOTXORPEN       = 10;
  1699.     const int R2_NOP             = 11;
  1700.     const int R2_MERGENOTPEN     = 12;
  1701.     const int R2_COPYPEN         = 13;
  1702.     const int R2_MERGEPENNOT     = 14;
  1703.     const int R2_MERGEPEN        = 15;
  1704.     const int R2_WHITE           = 16;
  1705.  
  1706.     // PolyFill Modes
  1707.     const int ALTERNATE  = 1;
  1708.     const int WINDING    = 2;
  1709.  
  1710.     const UINT ETO_GRAYED   = 0x0001;
  1711.     const UINT ETO_OPAQUE   = 0x0002;
  1712.     const UINT ETO_CLIPPED  = 0x0004;
  1713.  
  1714.     /*
  1715.     // Metafile Functions
  1716.     const UINT META_SETBKCOLOR            = 0x0201;
  1717.     const UINT META_SETBKMODE             = 0x0102;
  1718.     const UINT META_SETMAPMODE            = 0x0103;
  1719.     const UINT META_SETROP2               = 0x0104;
  1720.     const UINT META_SETRELABS             = 0x0105;
  1721.     const UINT META_SETPOLYFILLMODE       = 0x0106;
  1722.     const UINT META_SETSTRETCHBLTMODE     = 0x0107;
  1723.     const UINT META_SETTEXTCHAREXTRA      = 0x0108;
  1724.     const UINT META_SETTEXTCOLOR          = 0x0209;
  1725.     const UINT META_SETTEXTJUSTIFICATION  = 0x020A;
  1726.     const UINT META_SETWINDOWORG          = 0x020B;
  1727.     const UINT META_SETWINDOWEXT          = 0x020C;
  1728.     const UINT META_SETVIEWPORTORG        = 0x020D;
  1729.     const UINT META_SETVIEWPORTEXT        = 0x020E;
  1730.     const UINT META_OFFSETWINDOWORG       = 0x020F;
  1731.     const UINT META_SCALEWINDOWEXT        = 0x0410;
  1732.     const UINT META_OFFSETVIEWPORTORG     = 0x0211;
  1733.     const UINT META_SCALEVIEWPORTEXT      = 0x0412;
  1734.     const UINT META_LINETO                = 0x0213;
  1735.     const UINT META_MOVETO                = 0x0214;
  1736.     const UINT META_EXCLUDECLIPRECT       = 0x0415;
  1737.     const UINT META_INTERSECTCLIPRECT     = 0x0416;
  1738.     const UINT META_ARC                   = 0x0817;
  1739.     const UINT META_ELLIPSE               = 0x0418;
  1740.     const UINT META_FLOODFILL             = 0x0419;
  1741.     const UINT META_PIE                   = 0x081A;
  1742.     const UINT META_RECTANGLE             = 0x041B;
  1743.     const UINT META_ROUNDRECT             = 0x061C;
  1744.     const UINT META_PATBLT                = 0x061D;
  1745.     const UINT META_SAVEDC                = 0x001E;
  1746.     const UINT META_SETPIXEL              = 0x041F;
  1747.     const UINT META_OFFSETCLIPRGN         = 0x0220;
  1748.     const UINT META_TEXTOUT               = 0x0521;
  1749.     const UINT META_BITBLT                = 0x0922;
  1750.     const UINT META_STRETCHBLT            = 0x0B23;
  1751.     const UINT META_POLYGON               = 0x0324;
  1752.     const UINT META_POLYLINE              = 0x0325;
  1753.     const UINT META_ESCAPE                = 0x0626;
  1754.     const UINT META_RESTOREDC             = 0x0127;
  1755.     const UINT META_FILLREGION            = 0x0228;
  1756.     const UINT META_FRAMEREGION           = 0x0429;
  1757.     const UINT META_INVERTREGION          = 0x012A;
  1758.     const UINT META_PAINTREGION           = 0x012B;
  1759.     const UINT META_SELECTCLIPREGION      = 0x012C;
  1760.     const UINT META_SELECTOBJECT          = 0x012D;
  1761.     const UINT META_SETTEXTALIGN          = 0x012E;
  1762.     const UINT META_DRAWTEXT              = 0x062F;
  1763.  
  1764.     const UINT    META_CHORD              = 0x0830;
  1765.     const UINT    META_SETMAPPERFLAGS     = 0x0231;
  1766.     const UINT    META_EXTTEXTOUT         = 0x0a32;
  1767.     const UINT    META_SETDIBTODEV        = 0x0d33;
  1768.     const UINT    META_SELECTPALETTE      = 0x0234;
  1769.     const UINT    META_REALIZEPALETTE     = 0x0035;
  1770.     const UINT    META_ANIMATEPALETTE     = 0x0436;
  1771.     const UINT    META_SETPALENTRIES      = 0x0037;
  1772.     const UINT    META_POLYPOLYGON        = 0x0538;
  1773.     const UINT    META_RESIZEPALETTE      = 0x0139;
  1774.  
  1775.     const UINT    META_DIBBITBLT          = 0x0940;
  1776.     const UINT    META_DIBSTRETCHBLT      = 0x0b41;
  1777.     const UINT    META_DIBCREATEPATTERNBRUSH   = 0x0142;
  1778.     const UINT    META_STRETCHDIB         = 0x0f43;
  1779.  
  1780.     const UINT META_EXTFLOODFILL          = 0x0548;
  1781.  
  1782.     const UINT META_RESETDC               = 0x014C;
  1783.     const UINT META_STARTDOC              = 0x014D;
  1784.     const UINT META_STARTPAGE             = 0x004F;
  1785.     const UINT META_ENDPAGE               = 0x0050;
  1786.     const UINT META_ABORTDOC              = 0x0052;
  1787.     const UINT META_ENDDOC                = 0x005E;
  1788.  
  1789.     const UINT    META_DELETEOBJECT       = 0x01f0;
  1790.  
  1791.     const UINT    META_CREATEPALETTE      = 0x00f7;
  1792.     const UINT META_CREATEBRUSH           = 0x00F8;
  1793.     const UINT META_CREATEPATTERNBRUSH    = 0x01F9;
  1794.     const UINT META_CREATEPENINDIRECT     = 0x02FA;
  1795.     const UINT META_CREATEFONTINDIRECT    = 0x02FB;
  1796.     const UINT META_CREATEBRUSHINDIRECT   = 0x02FC;
  1797.     const UINT META_CREATEBITMAPINDIRECT  = 0x02FD;
  1798.     const UINT META_CREATEBITMAP          = 0x06FE;
  1799.     const UINT META_CREATEREGION          = 0x06FF;
  1800.     */
  1801.  
  1802.     /*
  1803.     // Spooler Error Codes
  1804.     const UINT SP_NOTREPORTED       = 0x4000;
  1805.     const int SP_ERROR              = -1;
  1806.     const int SP_APPABORT           = -2;
  1807.     const int SP_USERABORT          = -3;
  1808.     const int SP_OUTOFDISK          = -4;
  1809.     const int SP_OUTOFMEMORY        = -5;
  1810.  
  1811.     const int PR_JOBSTATUS          = 0x0000;
  1812.  
  1813.     // GDI Escapes
  1814.     const int NEWFRAME              = 1;
  1815.     const int ABORTDOC              = 2;
  1816.     const int NEXTBAND              = 3;
  1817.     const int SETCOLORTABLE         = 4;
  1818.     const int GETCOLORTABLE         = 5;
  1819.     const int FLUSHOUTPUT           = 6;
  1820.     const int DRAFTMODE             = 7;
  1821.     const int QUERYESCSUPPORT       = 8;
  1822.     const int SETABORTPROC          = 9;
  1823.     const int STARTDOC              = 10;
  1824.     const int ENDDOC                = 11;
  1825.     const int GETPHYSPAGESIZE       = 12;
  1826.     const int GETPRINTINGOFFSET     = 13;
  1827.     const int GETSCALINGFACTOR      = 14;
  1828.     const int MFCOMMENT             = 15;
  1829.     const int GETPENWIDTH           = 16;
  1830.     const int SETCOPYCOUNT          = 17;
  1831.     const int SELECTPAPERSOURCE     = 18;
  1832.     const int DEVICEDATA            = 19;
  1833.     const int PASSTHROUGH           = 19;
  1834.     const int GETTECHNOLGY          = 20;
  1835.     const int GETTECHNOLOGY         = 20;
  1836.     const int SETLINECAP            = 21;
  1837.     const int SETLINEJOIN           = 22;
  1838.     const int SETMITERLIMIT         = 23;
  1839.     const int BANDINFO              = 24;
  1840.     const int DRAWPATTERNRECT       = 25;
  1841.     const int GETVECTORPENSIZE      = 26;
  1842.     const int GETVECTORBRUSHSIZE    = 27;
  1843.     const int ENABLEDUPLEX          = 28;
  1844.     const int GETSETPAPERBINS       = 29;
  1845.     const int GETSETPRINTORIENT     = 30;
  1846.     const int ENUMPAPERBINS         = 31;
  1847.     const int SETDIBSCALING         = 32;
  1848.     const int EPSPRINTING           = 33;
  1849.     const int ENUMPAPERMETRICS      = 34;
  1850.     const int GETSETPAPERMETRICS    = 35;
  1851.     const int POSTSCRIPT_DATA       = 37;
  1852.     const int POSTSCRIPT_IGNORE     = 38;
  1853.     const int MOUSETRAILS           = 39;
  1854.  
  1855.     const int GETEXTENDEDTEXTMETRICS = 256;
  1856.     const int GETEXTENTTABLE        = 257;
  1857.     const int GETPAIRKERNTABLE      = 258;
  1858.     const int GETTRACKKERNTABLE     = 259;
  1859.     const int EXTTEXTOUT            = 512;
  1860.     const int GETFACENAME           = 513;
  1861.     const int ENABLERELATIVEWIDTHS  = 768;
  1862.     const int ENABLEPAIRKERNING     = 769;
  1863.     const int SETKERNTRACK          = 770;
  1864.     const int SETALLJUSTVALUES      = 771;
  1865.     const int SETCHARSET            = 772;
  1866.  
  1867.     const int STRETCHBLT            = 2048;
  1868.  
  1869.     const int GETSETSCREENPARAMS    = 3072;
  1870.  
  1871.     const int BEGIN_PATH            = 4096;
  1872.     const int CLIP_TO_PATH          = 4097;
  1873.     const int END_PATH              = 4098;
  1874.     const int EXT_DEVICE_CAPS       = 4099;
  1875.     const int RESTORE_CTM           = 4100;
  1876.     const int SAVE_CTM              = 4101;
  1877.     const int SET_ARC_DIRECTION     = 4102;
  1878.     const int SET_BACKGROUND_COLOR  = 4103;
  1879.     const int SET_POLY_MODE         = 4104;
  1880.     const int SET_SCREEN_ANGLE      = 4105;
  1881.     const int SET_SPREAD            = 4106;
  1882.     const int TRANSFORM_CTM         = 4107;
  1883.     const int SET_CLIP_BOX          = 4108;
  1884.     const int SET_BOUNDS            = 4109;
  1885.     */
  1886. }
  1887.